import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useRemoteStore = defineStore('remote', () => {
  // 获取远程控制码
  const remoteCode = ref('')
  const setRemoteCode = (code: string) => {
    remoteCode.value = code
  }
  // 获取本地控制码
  const localCode = ref('')
  const setLocalCode = (code: string) => {
    localCode.value = code
  }
  // 控制状态文案
  const controlText = ref('')
  const setControlText = (text: string) => {
    controlText.value = text
  }

  return { remoteCode, setRemoteCode, localCode, setLocalCode, controlText, setControlText }
})
